#define _GNU_SOURCE

#include "app_pool.h"
#include <unistd.h>

void *print_task(void *arg)
{
    printf("print_task is running...,%d\n ",gettid());
    sleep(5);
    printf("print_task is done...,%d\n",gettid() );
    return NULL;
}

int main(int argc, char const *argv[])
{
    app_pool_init();

    app_pool_submitTask(print_task, NULL);
    app_pool_submitTask(print_task, NULL);
    app_pool_submitTask(print_task, NULL);
    app_pool_submitTask(print_task, NULL);
    app_pool_submitTask(print_task, NULL);
    app_pool_submitTask(print_task, NULL);


    sleep(30);
    app_pool_destroy();

    return 0;
}
